package com.hui.util;

import com.hui.dao.AdminDao;
import com.hui.dao.ClassDao;
import com.hui.dao.StudentDao;
import com.hui.dao.AdminDaoImpl;
import com.hui.dao.ClassDaoImpl;
import com.hui.dao.StudentDaoImpl;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: 李昭辉
 * @Date: 2021/06/19/16:18
 * @Description: 工厂类，专门生产 Dao 层的实现类
 */
public class DaoFactory {
    private static AdminDao adminDao = new AdminDaoImpl();
    private static StudentDao studentDao = new StudentDaoImpl();
    private static ClassDao classDao = new ClassDaoImpl();

    public static AdminDao getAdminDao() {
        return adminDao;
    }

    public static StudentDao getStudentDao() {
        return studentDao;
    }

    public static ClassDao getClassDao() {
        return classDao;
    }

}
